using System.Collections.Generic;
using UnityEngine;

public class DeactivateForGameMode : MonoBehaviour
{
	private void Awake()
	{
		if (GameController.instance.curTypeGame != TypeGame.tanks && GameController.instance.curTypeGame != TypeGame.race)
		{
			return;
		}
		List<GameObject> list = new List<GameObject>();
		foreach (Transform item in base.transform)
		{
			list.Add(item.gameObject);
		}
		list.ForEach(delegate(GameObject x)
		{
			Object.Destroy(x);
		});
	}
}
